﻿Public Class Login

    ''' <summary>
    ''' 登录操作
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks></remarks>
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim username As String = TextBox1.Text.Trim
        Dim password As String = TextBox2.Text.Trim
        If UserBLL.Login(username, password) Then
            'MessageBox.Show("登陆成功")
            Me.Hide()
            Dim mainform As New MainForm
            mainform.Label1.Text = "你好，管理员 " + username
            Me.Owner = mainform
            mainform.Show()





        Else
            MessageBox.Show("用户名或者密码错误")
        End If



    End Sub

    Private Sub Button2_Click(sender As System.Object, e As System.EventArgs)

      


    End Sub

    Private Sub RichTextBox1_TextChanged(sender As System.Object, e As System.EventArgs)

    End Sub
End Class